package engine

import (
	"encoding/json"
	"testing"
)

func TestCreateTask(t *testing.T) {
	reqData := `
{
    "skillId": "leave",
    "message": {
        "messageId": "0e9c401a-d543-4b0b-bf2b-3ba058d4321c",
        "timeStamp": 1749038471742,
        "role": "user",
        "parts": [
            {
                "textPart": {
                    "text": "我要请假"
                },
                "filePart": null,
                "formPart": null
            }
        ],
        "kind": "message"
    }
}	
`
	createTask := &CreateTaskRequest{}
	err := json.Unmarshal([]byte(reqData), createTask)
	if err != nil {
		t.Error(err)
		t.FailNow()
	}
}
